/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pt.ipleiria.plp.ui;

import de.enough.polish.ui.Command;
import de.enough.polish.ui.CommandListener;
import de.enough.polish.ui.Displayable;
import de.enough.polish.ui.Form;
import de.enough.polish.ui.Screen;
import de.enough.polish.ui.StringItem;
import de.enough.polish.util.Locale;
import pt.ipleiria.plp.BlackSpotterMidlet;

/**
 *
 * @author filipe
 */
public class OnHold extends Form implements CommandListener {

    private BlackSpotterMidlet midlet;
    private Screen nextScreen;

    public OnHold(BlackSpotterMidlet midlet, Screen nextScreen) {
        //#style defaultScreen
        super(Locale.get("title.onhold"));
        this.setCommandListener(this);
        this.midlet = midlet;
        this.nextScreen = nextScreen;

        StringItem msg = new StringItem("", Locale.get("title.onhold"));

        this.append(msg);
    }

    public void commandAction(Command c, Displayable d) {
    }

    public void finishWait() {
        midlet.getDisplay().setCurrent(nextScreen);
    }

}
